<extend name="public@base"/>
block(name='main')
    .wrap.js-check-wrap
        ul.nav.nav-tabs(role="tablist")
            li.nav-item: a.nav-link.active(href='#A', data-toggle='tab') {:lang('WEB_SITE_INFOS')}
            li.nav-item: a.nav-link(href='#B', data-toggle='tab') {:lang('SEO_SETTING')}
            li.nav-item: a.nav-link(href='#F', data-toggle='tab') 用户注册设置
            li.nav-item: a.nav-link(href='#G', data-toggle='tab') CDN设置
        form.form-horizontal.js-ajax-form.pt-5(role='form', action="{:url('setting/sitePost')}", method='post')
            fieldset
                .tabbable
                    .tab-content
                        #A.tab-pane.active
                            .form-group.form-row
                                label.col-2.col-form-label.text-right(for='input-site-name')
                                    span.form-required
                                    | {:lang('WEBSITE_NAME')}
                                .col-8.col-lg-6
                                    input#input-site-name.form-control(type='text', name='options[site_name]', value="{$site_info.site_name|default=''}")
                            .form-group.form-row
                                label.col-2.col-form-label.text-right(for='input-admin_url_password')
                                    | 后台加密码
                                    a(href='http://www.thinkcmf.com/faq.html?url=https://www.kancloud.cn/thinkcmf/faq/493509', title='查看帮助手册', data-toggle='tooltip', target='_blank')
                                        i.fa.fa-question-circle
                                .col-8.col-lg-6
                                    input#input-admin_url_password.form-control(type='text', name='admin_settings[admin_password]', value="{$admin_settings.admin_password|default=''}")
                                    .text-muted.small 英文字母数字，不能为纯数字
                                    php $root=cmf_get_root();$root=empty($root)?'':'/'.$root;$site_domain = cmf_get_domain().$root;
                                    small.text-danger 设置加密码后必须通过以下地址访问后台,请劳记此地址，为了安全，您也可以定期更换此加密码!
                                        .text-muted
                                            | 后台登录地址：
                                            span#js-site-admin-url {$site_domain}/{$admin_settings.admin_password|default='admin'}
                            .form-group.form-row
                                label.col-2.col-form-label.text-right(for='input-site_admin_theme') 后台模板
                                .col-8.col-lg-6
                                    php $site_admin_theme=empty($admin_settings['admin_theme'])?'':$admin_settings['admin_theme'];
                                    select#input-site_admin_theme.form-control(name='admin_settings[admin_theme]')
                                        <foreach name="admin_themes" item="vo">
                                            php $admin_theme_selected = $site_admin_theme == $vo ? "true" : "false";
                                            option(value='{$vo}', data-selected="{$admin_theme_selected}") {$vo}
                                        </foreach>
                            .form-group.form-row
                                label.col-2.col-form-label.text-right(for='input-site_adminstyle') {:lang('WEBSITE_ADMIN_THEME')}
                                .col-8.col-lg-6
                                    php
                                        | $site_admin_style=empty($admin_settings['admin_style'])?cmf_get_admin_style():$admin_settings['admin_style'];
                                    select#input-site_adminstyle.form-control(name='admin_settings[admin_style]')
                                        <foreach name="admin_styles" item="vo">
                                            php $admin_style_selected = $site_admin_style == $vo ? "true" : "false";
                                            option(value='{$vo}', data-selected="{$admin_style_selected}") {$vo}
                                        </foreach>
                            <if condition="APP_DEBUG && false">
                                .form-group.form-row
                                    label.col-2.col-form-label.text-right(for='input-default_app') 默认应用
                                    .col-8.col-lg-6
                                        php
                                            | $site_default_app=empty($cmf_settings['default_app'])?'demo':$cmf_settings['default_app'];
                                        select#input-default_app.form-control(name='cmf_settings[default_app]')
                                            <foreach name="apps" item="vo">
                                                php $default_app_selected = $site_default_app == $vo ? "true" : "false";
                                                option(value='{$vo}', data-selected="{$default_app_selected}") {$vo}
                                            </foreach>
                            </if>
                            .form-group.form-row
                                label.col-2.col-form-label.text-right(for='input-site_icp') {:lang('WEBSITE_ICP')}
                                .col-8.col-lg-6
                                    input#input-site_icp.form-control(type='text', name='options[site_icp]', value="{$site_info.site_icp|default=''}")
                            .form-group.form-row
                                label.col-2.col-form-label.text-right(for='input-site_icp') {:lang('WEBSITE_GWA')}
                                .col-8.col-lg-6
                                    input#input-site_gwa.form-control(type='text', name='options[site_gwa]', value="{$site_info.site_gwa|default=''}")
                            .form-group.form-row
                                label.col-2.col-form-label.text-right(for='input-site_admin_email') {:lang('WEBMASTER_EMAIL')}
                                .col-8.col-lg-6
                                    input#input-site_admin_email.form-control(type='text', name='options[site_admin_email]', value="{$site_info.site_admin_email|default=''}")
                            .form-group.form-row
                                label.col-2.col-form-label.text-right(for='input-site_analytics') {:lang('WEBSITE_STATISTICAL_CODE')}
                                .col-8.col-lg-6
                                    textarea#input-site_analytics.form-control(name='options[site_analytics]') {$site_info.site_analytics|default=''}
                            .form-group.form-row
                                .col-sm-offset-2.col-sm-10.offset-2
                                    button.btn.btn-primary.js-ajax-submit(type='submit', data-refresh='1')
                                        | {:lang('SAVE')}
                        #B.tab-pane
                            .form-group.form-row
                                label.col-2.col-form-label.text-right(for='input-site_seo_title') {:lang('WEBSITE_SEO_TITLE')}
                                .col-8.col-lg-6
                                    input#input-site_seo_title.form-control(type='text', name='options[site_seo_title]', value="{$site_info.site_seo_title|default=''}")
                            .form-group.form-row
                                label.col-2.col-form-label.text-right(for='input-site_seo_keywords') {:lang('WEBSITE_SEO_KEYWORDS')}
                                .col-8.col-lg-6
                                    input#input-site_seo_keywords.form-control(type='text', name='options[site_seo_keywords]', value="{$site_info.site_seo_keywords|default=''}")
                            .form-group.form-row
                                label.col-2.col-form-label.text-right(for='input-site_seo_description') {:lang('WEBSITE_SEO_DESCRIPTION')}
                                .col-8.col-lg-6
                                    textarea#input-site_seo_description.form-control(name='options[site_seo_description]') {$site_info.site_seo_description|default=''}
                            .form-group.form-row
                                .col-sm-offset-2.col-sm-10.offset-2
                                    button.btn.btn-primary.js-ajax-submit(type='submit', data-refresh='0')
                                        | {:lang('SAVE')}
                        #F.tab-pane
                            .form-group.form-row
                                label.col-2.col-form-label.text-right(for='input-banned_usernames') 用户注册验证
                                .col-8.col-lg-6
                                    select.form-control(name='cmf_settings[open_registration]')
                                        option(value='0') 是
                                        php $open_registration_selected = empty($cmf_settings['open_registration'])?'false':'true';
                                        option(value='1', data-selected="{$open_registration_selected}") 否
                            .form-group.form-row(style='display: none;')
                                label.col-2.col-form-label.text-right(for='input-banned_usernames') {:lang('SPECAIL_USERNAME')}
                                .col-8.col-lg-6
                                    textarea#input-banned_usernames.form-control(name='cmf_settings[banned_usernames]') {$cmf_settings.banned_usernames}
                            .form-group.form-row
                                .col-sm-offset-2.col-sm-10.offset-2
                                    button.btn.btn-primary.js-ajax-submit(type='submit', data-refresh='0')
                                        | {:lang('SAVE')}
                        #G.tab-pane
                            .form-group.form-row
                                label.col-2.col-form-label.text-right(for='input-cdn_static_root') 静态资源cdn地址
                                .col-8.col-lg-6
                                    input#input-cdn_static_root.form-control(type='text', name='cdn_settings[cdn_static_root]', value="{$cdn_settings.cdn_static_root|default=''}")
                                    small.text-muted
                                        | 不能以/结尾；设置这个地址后，请将ThinkCMF下的静态资源文件放在其下面；
                                        br
                                        | ThinkCMF下的静态资源文件大致包含以下(如果你自定义后，请自行增加)：
                                        br
                                        | themes/admin_simplebootx/public/assets
                                        br
                                        | static
                                        br
                                        | themes/simplebootx/public/assets
                                        br
                                        | 例如未设置cdn前：jquery的访问地址是/static/js/jquery.js,
                                        br
                                        | 设置cdn是后它的访问地址就是：静态资源cdn地址/static/js/jquery.js
                            .form-group.form-row
                                .col-sm-offset-2.col-sm-10.offset-2
                                    button.btn.btn-primary.js-ajax-submit(type='submit', data-refresh='0')
                                        | {:lang('SAVE')}